﻿using System;
using System.Web;

namespace MyLib.Web {
	/// <summary>
	/// 
	/// </summary>
	[Obsolete("Use AccessDeniedException instead.", false)]
	public class AccessDeniedHttpException : HttpException {
		/// <summary>
		/// 
		/// </summary>
		public const int AccessDeniedHttpCode = 403;

		/// <summary>
		/// 
		/// </summary>
		public AccessDeniedHttpException()
			: base(AccessDeniedHttpCode, Properties.Main.AccessDenied) {
		}

		/// <summary>
		/// 
		/// </summary>
		/// <param name="innerException"></param>
		public AccessDeniedHttpException(Exception innerException)
			: base(AccessDeniedHttpCode, Properties.Main.AccessDenied, innerException) {
		}
	} // end of AccessDeniedHttpException.

	/// <summary>
	/// 
	/// </summary>
	public class AccessDeniedException : ApplicationException {
		/// <summary>
		/// 
		/// </summary>
		public AccessDeniedException()
			: base(Properties.Main.AccessDenied) {
		}

		/// <summary>
		/// 
		/// </summary>
		/// <param name="action"></param>
		public AccessDeniedException(string action)
			: base(Properties.Main.AccessDenied + " : " + action) {
		}
	} // end of AccessDeniedException.
}
